package com.bot.rf.excel;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;

import java.util.ArrayList;
import java.util.List;

/**
 * @program: report-form-demo
 * @description:
 * @author: zyy
 * @create: 2021-03-19 09:59
 **/
public class InputExcelDataListener extends AnalysisEventListener<InputExcel> {

    public static List<InputExcel> excels = new ArrayList<>();
    /**
     * 这个每一条数据解析都会来调用
     *
     * @param data
     * one row value. Is is same as {@link AnalysisContext#readRowHolder()}
     * @param context
     */
    @Override
    public void invoke(InputExcel data, AnalysisContext context) {
        excels.add(data);
    }


    /**
     * 所有数据解析完成了 都会来调用
     *
     * @param context
     */
    @Override
    public void doAfterAllAnalysed(AnalysisContext context) {

    }
}
